import request from '@/request'
import qs from 'qs'

export const getUserInfo = (data) => {
    return request({
        url: '/sysUser/getUserInfo',
        method: "get",
        data
    })
}

export const getMenuTree = (data) => {
    return request({
        url: '/sysUser/getMenuTree',
        method: "get",
        data
    })
}

export const getPageForSysUser = (data) => {
    return request({
        url: `/sysUser/getPageForSysUser?${qs.stringify(data)}`,
        method: "get",        
    })
}

export const saveSysUser = (data) => {
    return request({
        url: "/sysUser/saveSysUser",
        method: "post",
        data
    })
}

export const updateSysUser = (data) => {
    return request({
        url: '/sysUser/updateSysUser',
        method: "post",
        data
    })
}

export const deleteSysUsers = (data) => {
    return request({
        url: '/sysUser/deleteSysUsers',
        method: "delete",
        data
    })
}